Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: multiple ingestion #178

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

techsavvyash
Copy link
Collaborator

@techsavvyash techsavvyash commented Oct 18, 2023

  • fix multiple ingestion -- where duplicate dimension entries are getting created on running ingest-data multiple times
  • remove dependency on grammar files during ingest-data process
  • skips a data file during ingest-data incase the file is not present in the ingest folder during a particular run, instead of throwing an error.

@ChakshuGautam
Copy link
Owner

@techsavvyash please add unit + e2e. Need this to be tested on every commit.

@tushar5526
Copy link
Contributor

I tested this on gitpod, but I am not able to see the values being updated and getting these errors instead. Can you also share the ingest files that you are using.
Screenshot 2023-10-19 at 4 23 07 PM

@tushar5526
Copy link
Contributor

Have we switched to using PG_POOL ? @techsavvyash

@techsavvyash
Copy link
Collaborator Author

Have we switched to using PG_POOL ? @techsavvyash

yes! The changes in this PR are ported from #101

@techsavvyash
Copy link
Collaborator Author

I tested this on gitpod, but I am not able to see the values being updated and getting these errors instead. Can you also share the ingest files that you are using. Screenshot 2023-10-19 at 4 23 07 PM

DMed on discord

@techsavvyash techsavvyash linked an issue Oct 19, 2023 that may be closed by this pull request
@techsavvyash
Copy link
Collaborator Author

@techsavvyash please add unit + e2e. Need this to be tested on every commit.

added.

@techsavvyash
Copy link
Collaborator Author

I tested this on gitpod, but I am not able to see the values being updated and getting these errors instead. Can you also share the ingest files that you are using. Screenshot 2023-10-19 at 4 23 07 PM

checking into this, meanwhile you can refer this video: https://drive.google.com/file/d/1YOjHJCkuHzb1ttI1B_3aLSE6bRcv2waZ/view?usp=share_link

@techsavvyash
Copy link
Collaborator Author

@tushar5526 checked on gitpod, not able to reproduce the error mentioned, can you share the steps you followed.
Here is what I did:

  1. Open the PR in gitpod
  2. create a top level .env at the root of the project using the given .env.sample.
  3. run docker-compose up -d
  4. create a .env in impl/c-qube with the following format
DATABASE_URL="postgres://timescaledb:postgrespassword@localhost:5432/postgres?sslmode=disable"
DB_USERNAME="timescaledb"
DB_HOST="localhost"
DB_NAME="postgres"
DB_PASSWORD="postgrespassword"
DB_PORT="5432"
  1. install dependencies inside impl/c-qube using yarn
  2. run yarn cli ingest
  3. run yarn cli ingest-data

and everything worked fine for me.
Attaching a screenshot for reference, check the bottom left to confirm that its the gitpod environment.
image

@ChakshuGautam
Copy link
Owner

@tushar5526 please review this.

@tushar5526
Copy link
Contributor

LGTM, great work @techsavvyash! Thanks

@github-actions
Copy link

Pull Request Test Coverage Report for Build 6693125896

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 0.0%

Totals Coverage Status
Change from base Build 6080431350: 0.0%
Covered Lines: 0
Relevant Lines: 0

💛 - Coveralls

@tushar5526
Copy link
Contributor

Works great! Thanks @techsavvyash!

@tushar5526
Copy link
Contributor

Screenshot 2023-11-01 at 10 29 28 AM

I still see some errors while testing @techsavvyash

);
});
} else {
console.error(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use the default logger instead of console?

@tushar5526
Copy link
Contributor

Error: ENOENT: no such file or directory, stat './ingest/programs/diksha/linkedqrcount-event.data.csv'
    at Object.stat (node:internal/fs/sync:58:25)
    at Object.statSync (node:fs:1669:17)
    at createCompoundDatasetDataToBeInserted (/workspace/cQube-ingestion/impl/c-qube/src/services/csv-adapter/parser/dataset/dataset-grammar.helper.ts:110:20)

@techsavvyash
Copy link
Collaborator Author

Screenshot 2023-11-01 at 10 29 28 AM I still see some errors while testing @techsavvyash

I am getting no error of this sort on my local with the same ingest folder. Can you share reproduction steps?

@techsavvyash
Copy link
Collaborator Author

Error: ENOENT: no such file or directory, stat './ingest/programs/diksha/linkedqrcount-event.data.csv'
    at Object.stat (node:internal/fs/sync:58:25)
    at Object.statSync (node:fs:1669:17)
    at createCompoundDatasetDataToBeInserted (/workspace/cQube-ingestion/impl/c-qube/src/services/csv-adapter/parser/dataset/dataset-grammar.helper.ts:110:20)

not able to reproduce, please share reproduction steps.

@techsavvyash
Copy link
Collaborator Author

The error reported is not being reproduced on gitpod as well for me.

@tushar5526
Copy link
Contributor

Tested again, works good. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bugs in Upserting of Events
3 participants